Integrand size = 31, antiderivative size = 165 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {1}{2} a^4 (12 A+13 B) x+\frac {a^4 (A+4 B) \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^4 (2 A+B) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d} \]
[Out]
Time = 0.46 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {4102, 4103, 4081, 3855} \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {a^4 (A+4 B) \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^4 (2 A+B) \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \sin (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{6 d}+\frac {1}{2} a^4 x (12 A+13 B)+\frac {(2 A+B) \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{2 d}+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^3}{3 d} \]
[In]
[Out]
Rule 3855
Rule 4081
Rule 4102
Rule 4103
Rubi steps \begin{align*} \text {integral}& = \frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {1}{3} \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (3 a (2 A+B)-a (A-3 B) \sec (c+d x)) \, dx \\ & = \frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}+\frac {1}{6} \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (2 a^2 (11 A+9 B)-a^2 (8 A-3 B) \sec (c+d x)\right ) \, dx \\ & = \frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\frac {1}{6} \int \cos (c+d x) (a+a \sec (c+d x)) \left (15 a^3 (2 A+B)+6 a^3 (A+4 B) \sec (c+d x)\right ) \, dx \\ & = \frac {5 a^4 (2 A+B) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}-\frac {1}{6} \int \left (-3 a^4 (12 A+13 B)-6 a^4 (A+4 B) \sec (c+d x)\right ) \, dx \\ & = \frac {1}{2} a^4 (12 A+13 B) x+\frac {5 a^4 (2 A+B) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\left (a^4 (A+4 B)\right ) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} a^4 (12 A+13 B) x+\frac {a^4 (A+4 B) \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^4 (2 A+B) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {(2 A+B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac {(8 A-3 B) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(342\) vs. \(2(165)=330\).
Time = 4.95 (sec) , antiderivative size = 342, normalized size of antiderivative = 2.07 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {a^4 \cos ^5(c+d x) \sec ^8\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^4 (A+B \sec (c+d x)) \left (72 A x+78 B x-\frac {12 (A+4 B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {12 (A+4 B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {3 (27 A+16 B) \cos (d x) \sin (c)}{d}+\frac {3 (4 A+B) \cos (2 d x) \sin (2 c)}{d}+\frac {A \cos (3 d x) \sin (3 c)}{d}+\frac {3 (27 A+16 B) \cos (c) \sin (d x)}{d}+\frac {3 (4 A+B) \cos (2 c) \sin (2 d x)}{d}+\frac {A \cos (3 c) \sin (3 d x)}{d}+\frac {12 B \sin \left (\frac {d x}{2}\right )}{d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {12 B \sin \left (\frac {d x}{2}\right )}{d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{192 (B+A \cos (c+d x))} \]
[In]
[Out]
Time = 2.85 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.84
method | result | size |
parallelrisch | \(\frac {\left (-2 \cos \left (d x +c \right ) \left (A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+2 \cos \left (d x +c \right ) \left (A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (\frac {41 A}{6}+4 B \right ) \sin \left (2 d x +2 c \right )+\left (A +\frac {B}{4}\right ) \sin \left (3 d x +3 c \right )+\frac {A \sin \left (4 d x +4 c \right )}{12}+12 \left (A +\frac {13 B}{12}\right ) d x \cos \left (d x +c \right )+\sin \left (d x +c \right ) \left (A +\frac {9 B}{4}\right )\right ) a^{4}}{2 d \cos \left (d x +c \right )}\) | \(139\) |
derivativedivides | \(\frac {a^{4} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{4} \tan \left (d x +c \right )+4 a^{4} A \left (d x +c \right )+4 B \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 a^{4} A \sin \left (d x +c \right )+6 B \,a^{4} \left (d x +c \right )+4 a^{4} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 B \,a^{4} \sin \left (d x +c \right )+\frac {a^{4} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(179\) |
default | \(\frac {a^{4} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{4} \tan \left (d x +c \right )+4 a^{4} A \left (d x +c \right )+4 B \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 a^{4} A \sin \left (d x +c \right )+6 B \,a^{4} \left (d x +c \right )+4 a^{4} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 B \,a^{4} \sin \left (d x +c \right )+\frac {a^{4} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(179\) |
risch | \(6 a^{4} A x +\frac {13 a^{4} x B}{2}-\frac {27 i a^{4} A \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {2 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{4}}{d}+\frac {2 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{4}}{d}+\frac {27 i a^{4} A \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {i a^{4} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{2 d}-\frac {i a^{4} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{2 d}+\frac {2 i B \,a^{4}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} B \,a^{4}}{8 d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} B \,a^{4}}{8 d}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {4 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {4 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}+\frac {a^{4} A \sin \left (3 d x +3 c \right )}{12 d}\) | \(296\) |
norman | \(\frac {\left (6 a^{4} A +\frac {13}{2} B \,a^{4}\right ) x +\left (-18 a^{4} A -\frac {39}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-18 a^{4} A -\frac {39}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-6 a^{4} A -\frac {13}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-6 a^{4} A -\frac {13}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (6 a^{4} A +\frac {13}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (18 a^{4} A +\frac {39}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (18 a^{4} A +\frac {39}{2} B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {a^{4} \left (18 A +11 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {5 a^{4} \left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{d}+\frac {8 a^{4} \left (5 A +4 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {20 a^{4} \left (7 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {7 a^{4} \left (10 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}-\frac {4 a^{4} \left (11 A +9 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 d}+\frac {a^{4} \left (50 A -27 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}+\frac {a^{4} \left (A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a^{4} \left (A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(457\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.91 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (12 \, A + 13 \, B\right )} a^{4} d x \cos \left (d x + c\right ) + 3 \, {\left (A + 4 \, B\right )} a^{4} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (A + 4 \, B\right )} a^{4} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, A a^{4} \cos \left (d x + c\right )^{3} + 3 \, {\left (4 \, A + B\right )} a^{4} \cos \left (d x + c\right )^{2} + 8 \, {\left (5 \, A + 3 \, B\right )} a^{4} \cos \left (d x + c\right ) + 6 \, B a^{4}\right )} \sin \left (d x + c\right )}{6 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
Timed out. \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.13 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{4} - 12 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 48 \, {\left (d x + c\right )} A a^{4} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{4} - 72 \, {\left (d x + c\right )} B a^{4} - 6 \, A a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 24 \, B a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, A a^{4} \sin \left (d x + c\right ) - 48 \, B a^{4} \sin \left (d x + c\right ) - 12 \, B a^{4} \tan \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.37 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=-\frac {\frac {12 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - 3 \, {\left (12 \, A a^{4} + 13 \, B a^{4}\right )} {\left (d x + c\right )} - 6 \, {\left (A a^{4} + 4 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 6 \, {\left (A a^{4} + 4 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (30 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 21 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 76 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 48 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 54 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 27 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 13.58 (sec) , antiderivative size = 242, normalized size of antiderivative = 1.47 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {20\,A\,a^4\,\sin \left (c+d\,x\right )}{3\,d}+\frac {4\,B\,a^4\,\sin \left (c+d\,x\right )}{d}+\frac {12\,A\,a^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {13\,B\,a^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {8\,B\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a^4\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {B\,a^4\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {2\,A\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d} \]
[In]
[Out]